export interface MenuItem {
  selfid: number
  name: string
  pid: number
  url: string
  flag: number|string
  childs: MenuItem[]
}

export interface MenuResponse {
  info_list: MenuItem[] | { selfid: number; name: string; pid: number; url: string; flag: number; childs: /*elided*/ any[] }[]
  msg: string
  data: {
    info_list: MenuItem[]
  }
}

export interface SystemUser {
  id: number
  username: string
}

export interface SystemUserResponse {
  info_list: SystemUser[] | { id: number; username: string }[]
  msg: string
  data: {
    info_list: SystemUser[]
  }
}

export interface UpdateRightResponse {
  msg: string
  code: string
}

export interface UpdateRightParams {
  username: string
  menuid: number
  flag: number
}

export interface GetUserRightParams {
  username: string
} 